Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds new annotation syntax for Thrust, extracted from PR #18, enabling more expressive type refinements and specifications.
- Adds support for boolean literals (
true,false) in both formula and term contexts - Introduces box and mutable reference term syntax using angle brackets:
<t>for box terms and<t1, t2>for mutable reference terms - Adds pointer sort syntax using ampersands:
&Sfor box sorts and&mut Sfor mutable reference sorts - Implements ad-hoc parsing for type parameters using the pattern
Tn(e.g.,T0,T1)
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tests/ui/pass/annot_mut_term.rs | Test case verifying mutable reference term syntax <*x, y> in ensures clause |
| tests/ui/pass/annot_box_term.rs | Test case verifying box term syntax <x> in function signatures and requires clauses |
| tests/ui/fail/annot_mut_term.rs | Negative test ensuring mutable reference term verification correctly fails |
| tests/ui/fail/annot_box_term.rs | Negative test ensuring box term verification correctly fails |
| src/annot.rs | Core implementation adding FormulaOrTerm::Literal variant, parsing logic for <> term syntax, & sort syntax, and Tn sort parameters |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
coeff-aij
pushed a commit
to coeff-aij/thrust
that referenced
this pull request
Jan 12, 2026
More annotation syntax
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
extracted from #18